﻿function Eurlencode(url) {
var myUrl = escape(url);
    myUrl.replace('+', '%2B');
    myUrl.replace('/', '%2F');
    if(navigator.appName.indexOf("Microsoft")!=-1) {
        return myUrl.substr(0,1024);
    } else {
        return myUrl.substr(0,4096);
    }
}
function write_ref(uid) {
   document.write("<script type='text/javascript' src='http://e-referrer.com/link.php?e_uid=" + uid);
   document.write("&e_ref=" + Eurlencode(document.referrer));
   document.write("&e_loc=" + Eurlencode(document.location));
   document.write("&e_title=" + Eurlencode(document.title));
   document.write("' + ';'>\n");
   document.write("</");
   document.write("script>\n");
}